var $ = require('../../lib/jquery');
var util = require('./common/util');
var nav = require('./common/nav');
var _header = require('./common/header');
var template = require('../tpl/template');
var minHeight = require('./common/minHeight');
minHeight.init();
var _nav = new nav();
var header = new _header();
var jgxq = {
  fetch: function (){
    var _this = this;
    util.fetch('api/medical/queryCommunityHomeMedical',{
      communityId: util.getParam('id') || '1',
      pageSize:'1',
      page:'1'
    }).then(function (res){
      _this.render(res.data);
    })
  },
  render: function (data) {
    var tpl = template('jgxq',{data:data});
    $('.js_jgxq').html(tpl)
  },
  bindevent: function () {
    $('.js_index').on('click', function() {
      location.href = "./index.html";
    })
    $('.js_jgjs').on('click',function(){
      history.back();
    })
  }
}
jgxq.bindevent()
jgxq.fetch();